package com.mopa.qzonegallery;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
public class HcSqlHelper extends HcSqlSDOpenHelper {
	public static final String TB_NAME = "file_table";
	public static final String ID="_id";
	public static final String FILEPATH="filepath";
	public static final String FOLDERPATH="folderpath";
	public static final String FILENAME="filename";
	public HcSqlHelper(String name, CursorFactory factory,
			int version) {
		super(name, factory, version);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		// TODO Auto-generated method stub
			db.execSQL("CREATE TABLE IF NOT EXISTS "+
                TB_NAME+"("+
                ID+" integer primary key autoincrement,"+
                FILEPATH+" varchar,"+
                FOLDERPATH+" varchar,"+
                FILENAME+" varchar"+
                ")"
                );
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		db.execSQL("DROP TABLE IF EXISTS " + TB_NAME);
        onCreate(db);
	}

}
